﻿<%@ Page Language="C#" %>
<%@ Register TagPrefix="recaptcha" Namespace="Recaptcha" Assembly="Recaptcha" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">

	protected void Unnamed1_Click(object sender, EventArgs e)
	{
		if (Page.IsValid)
		{
			if (FormsAuthentication.Authenticate(txtUserName.Text, txtPassword.Text))
				FormsAuthentication.RedirectFromLoginPage(txtUserName.Text, false);
		}
	}
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>登录</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
		用户名：<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>
		密码：<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox><br />
		<recaptcha:RecaptchaControl ID="recaptcha" runat="server"
		PublicKey="<%$ AppSettings:recaptcha.publickey %>"
		PrivateKey="<%$ AppSettings:recaptcha.privatekey %>" ErrorMessage="验证码错误" />


		<asp:Button runat="server" Text="登录" onclick="Unnamed1_Click" />
    </div>
    </form>
</body>
</html>
